'use strict';
var even_asc_odd_desc = function(collection){
    let even=[];
    let odd=[];
    for(let i=0;i<collection.length;i++){
        if(collection[i]%2==0){
            even.push(collection[i]);
        }
        else{
            odd.push(collection[i]);
        }
    }
    function sortnumber1(a,b){
        return a-b;
    }
    function sortnumber2(a,b){
        return b-a;
    }
    even.sort(sortnumber1);
    odd.sort(sortnumber2);
    let result=even.concat(odd);
    return result;
};
module.exports = even_asc_odd_desc;
